package top.ztf.erp.dao;

import org.apache.ibatis.annotations.Param;
import top.ztf.erp.domain.Permission;
import top.ztf.erp.domain.PermissionNode;

import java.util.List;

public interface PermissionDao {


    List<Permission> selectAll();

    Permission selectPermissionById(String id);

    int addPermission(Permission permission);

    int updatePermissionById(Permission permission);

    int deletePermissionById(String id);

    int deletePermissionRole(String id);


    Permission selectPermissionByName(@Param("name") String name,@Param("id") String id);

    List<PermissionNode> selectAllNode();

    List<PermissionNode> getChildPermission(String id);
}
